
#include <Servo.h>;

Servo myservo;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  myservo.attach(3);
}

void loop() {
  // put your main code here, to run repeatedly:
  int value=analogRead(A0);
  int pos=map(value,0,1023,0,179);
  myservo.write(pos);
  Serial.print(value);
  Serial.print(":");
  Serial.println(pos);
  // delay(1);
}
